package com.ruoyi.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.ErpReceivingPlanMapper;
import com.ruoyi.domain.ErpReceivingPlan;
import com.ruoyi.service.IErpReceivingPlanService;

/**
 * 收货计划Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-17
 */
@Service
public class ErpReceivingPlanServiceImpl implements IErpReceivingPlanService 
{
    @Autowired
    private ErpReceivingPlanMapper erpReceivingPlanMapper;

    /**
     * 查询收货计划
     * 
     * @param id 收货计划主键
     * @return 收货计划
     */
    @Override
    public ErpReceivingPlan selectErpReceivingPlanById(String id)
    {
        return erpReceivingPlanMapper.selectErpReceivingPlanById(id);
    }

    /**
     * 查询收货计划列表
     * 
     * @param erpReceivingPlan 收货计划
     * @return 收货计划
     */
    @Override
    public List<ErpReceivingPlan> selectErpReceivingPlanList(ErpReceivingPlan erpReceivingPlan)
    {
        return erpReceivingPlanMapper.selectErpReceivingPlanList(erpReceivingPlan);
    }

    /**
     * 新增收货计划
     * 
     * @param erpReceivingPlan 收货计划
     * @return 结果
     */
    @Override
    public int insertErpReceivingPlan(ErpReceivingPlan erpReceivingPlan)
    {
        erpReceivingPlan.setCreateTime(DateUtils.getNowDate());
        return erpReceivingPlanMapper.insertErpReceivingPlan(erpReceivingPlan);
    }

    /**
     * 修改收货计划
     * 
     * @param erpReceivingPlan 收货计划
     * @return 结果
     */
    @Override
    public int updateErpReceivingPlan(ErpReceivingPlan erpReceivingPlan)
    {
        erpReceivingPlan.setUpdateTime(DateUtils.getNowDate());
        return erpReceivingPlanMapper.updateErpReceivingPlan(erpReceivingPlan);
    }

    /**
     * 批量删除收货计划
     * 
     * @param ids 需要删除的收货计划主键
     * @return 结果
     */
    @Override
    public int deleteErpReceivingPlanByIds(String[] ids)
    {
        return erpReceivingPlanMapper.deleteErpReceivingPlanByIds(ids);
    }

    /**
     * 删除收货计划信息
     * 
     * @param id 收货计划主键
     * @return 结果
     */
    @Override
    public int deleteErpReceivingPlanById(String id)
    {
        return erpReceivingPlanMapper.deleteErpReceivingPlanById(id);
    }
}
